package com.kitri.springmvc;

import java.util.Date;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
@RequestMapping({ "/welcome", "/" })
public class WelcomeController {

	@RequestMapping(method = RequestMethod.GET)
	public String welcome(Model model) { /* ModelAndView, ModelMap */
		Date date = new Date();
		model.addAttribute("today", date);
		return "index";
	}
}
